import { FC } from "react";
import { Typography } from "antd";
import { TitleDefaultProps, TitlePropsType } from "./interface";
const { Title } = Typography;
const QTitle: FC<TitlePropsType> = (props: TitlePropsType) => {
  const { text, level, isCenter } = { ...TitleDefaultProps, ...props };
  return (
    <Title level={level} style={{ textAlign: isCenter ? "center" : "left", marginBottom: 0 }}>
      {text}
    </Title>
  );
};
export default QTitle;
